package com.kungfu.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class BaseController {
    protected Logger logger = LoggerFactory.getLogger(this.getClass());

    public void printDebug(String methodName, String message) {
        logger.debug("methodName:" + methodName + "|message:" + message);
    }

    public void printError(String methodName, String message) {
        logger.error("methodName:" + methodName + "|message:" + message);
    }


    public void printDebugException(String methodName, Throwable throwable) {
        logger.debug("methodName:" + methodName, throwable);
    }

    public void printErrorException(String methodName, String message, Throwable throwable) {
        logger.error("methodName:" + methodName + "|message:" + message, throwable);
    }
}
